package com.rms.hkpc.adapter;

import android.content.Context;

import com.rms.hkpc.R;
import com.rms.hkpc.adapter.base.BaseAdapter;
import com.rms.hkpc.adapter.base.BaseViewHolder;
import com.rms.hkpc.db.dto.StatusUseRateDto;

import java.util.List;

public class InsightAdapter extends BaseAdapter<StatusUseRateDto> {

    public InsightAdapter(Context context, List<StatusUseRateDto> mDatas, int layoutId) {
        super(context, mDatas, layoutId);
    }

    @Override
    public void convert(BaseViewHolder holder, StatusUseRateDto item, int position) {
        holder.setText(R.id.tv_top, item.getName() == null ? "" : item.getName());
        holder.setInsightPercentage(item.getRate(), item.getColor() == null ? "#333333" : item.getColor());
    }
}
